package cn.kilo.domain.service.order.stock.impl;

import cn.kilo.domain.model.order.entity.OrderStaffEntity;
import cn.kilo.domain.model.order.vo.OrderStatusVO;
import cn.kilo.domain.repository.IStrategyRepository;
import cn.kilo.domain.service.order.stock.IOrderStock;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author kilok
 */
@Component
@Slf4j
public class OrderStock implements IOrderStock {

    @Resource
    protected IStrategyRepository repository;

    @Override
    public OrderStaffEntity takeQueueValue() {
        return repository.takeQueueValue();
    }

    @Override
    public void addOrderStaffStockQueue(OrderStaffEntity orderStaffEntity) {
        repository.addOrderStaffStockQueue(orderStaffEntity);
    }

    @Override
    public void updateOrderStaffStockQueue(OrderStaffEntity orderStaffEntity) {
        repository.updateOrderStaffStock(orderStaffEntity);
    }

    @Override
    public void addOrderInfo(OrderStatusVO orderStatusVO) {
        repository.addOrderInfo(orderStatusVO);
    }

    @Override
    public OrderStatusVO takeOrderInfo() {
        return repository.takeOrderInfo();
    }


}
